<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::PCA Class Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_p_c_a.html">PCA</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_p_c_a-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::PCA Class Reference<div class="ingroups"><a class="el" href="group__unsupervised__trainer.html">Unsupervised Trainers</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Principal Component Analysis.  
 <a href="classshark_1_1_p_c_a.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_p_c_a_8h_source.html">shark/Algorithms/Trainers/PCA.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::PCA:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_p_c_a__inherit__graph.png" border="0" usemap="#ashark_1_1_p_c_a_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_p_c_a_inherit__map" id="ashark_1_1_p_c_a_inherit__map">
<area shape="rect" title="Principal Component Analysis." alt="" coords="56,94,145,120"/>
<area shape="rect" href="classshark_1_1_abstract_unsupervised_trainer.html" title=" " alt="" coords="5,5,196,46"/>
<area shape="poly" title=" " alt="" coords="103,62,103,93,98,93,98,62"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad3b450f29c9b4b265f0d16039cac8735" id="r_ad3b450f29c9b4b265f0d16039cac8735"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735">PCAAlgorithm</a> { <a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735aa46a1b1a70f542e1569589fb42528d6d">STANDARD</a>
, <a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735aa87e03fd3af865af990a4fdd3f0551b3">SMALL_SAMPLE</a>
, <a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735a91ee8e8923d2abb8c39354c99194c27f">AUTO</a>
 }</td></tr>
<tr class="separator:ad3b450f29c9b4b265f0d16039cac8735"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_unsupervised_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_unsupervised_trainer')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html">shark::AbstractUnsupervisedTrainer&lt; LinearModel&lt;&gt; &gt;</a></td></tr>
<tr class="memitem:a92fa6ed2ab64402cb414e3c19e9edeaf inherit pub_types_classshark_1_1_abstract_unsupervised_trainer" id="r_a92fa6ed2ab64402cb414e3c19e9edeaf"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html#a92fa6ed2ab64402cb414e3c19e9edeaf">ModelType</a></td></tr>
<tr class="separator:a92fa6ed2ab64402cb414e3c19e9edeaf inherit pub_types_classshark_1_1_abstract_unsupervised_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c951f84222a7bc22185b6e7b11357dd inherit pub_types_classshark_1_1_abstract_unsupervised_trainer" id="r_a9c951f84222a7bc22185b6e7b11357dd"><td class="memItemLeft" align="right" valign="top">typedef Model::InputType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html#a9c951f84222a7bc22185b6e7b11357dd">InputType</a></td></tr>
<tr class="separator:a9c951f84222a7bc22185b6e7b11357dd inherit pub_types_classshark_1_1_abstract_unsupervised_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fcc37e7133ddcadb66ffb9fa335ed1e inherit pub_types_classshark_1_1_abstract_unsupervised_trainer" id="r_a2fcc37e7133ddcadb66ffb9fa335ed1e"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html#a9c951f84222a7bc22185b6e7b11357dd">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html#a2fcc37e7133ddcadb66ffb9fa335ed1e">DatasetType</a></td></tr>
<tr class="separator:a2fcc37e7133ddcadb66ffb9fa335ed1e inherit pub_types_classshark_1_1_abstract_unsupervised_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a439006abce1b7c09792b7c574a2d709e" id="r_a439006abce1b7c09792b7c574a2d709e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a439006abce1b7c09792b7c574a2d709e">PCA</a> (bool whitening=false)</td></tr>
<tr class="separator:a439006abce1b7c09792b7c574a2d709e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a655563cb672cb1a67071e73fdf11a24c" id="r_a655563cb672cb1a67071e73fdf11a24c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a655563cb672cb1a67071e73fdf11a24c">PCA</a> (<a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; RealVector &gt; const &amp;inputs, bool whitening=false)</td></tr>
<tr class="separator:a655563cb672cb1a67071e73fdf11a24c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a900a33903800136e115a2d208067cba9" id="r_a900a33903800136e115a2d208067cba9"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a900a33903800136e115a2d208067cba9">name</a> () const</td></tr>
<tr class="memdesc:a900a33903800136e115a2d208067cba9"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name.  <br /></td></tr>
<tr class="separator:a900a33903800136e115a2d208067cba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13027f51bff74d5b7a39d4040a9aa403" id="r_a13027f51bff74d5b7a39d4040a9aa403"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a13027f51bff74d5b7a39d4040a9aa403">setWhitening</a> (bool whitening)</td></tr>
<tr class="separator:a13027f51bff74d5b7a39d4040a9aa403"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeae45267c5bc7a3cda484b203a1f15be" id="r_aeae45267c5bc7a3cda484b203a1f15be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#aeae45267c5bc7a3cda484b203a1f15be">train</a> (<a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;model, <a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; RealVector &gt; const &amp;inputs)</td></tr>
<tr class="separator:aeae45267c5bc7a3cda484b203a1f15be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52747dc693e68fe208daf290dc6b5f54" id="r_a52747dc693e68fe208daf290dc6b5f54"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a52747dc693e68fe208daf290dc6b5f54">setData</a> (<a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; RealVector &gt; const &amp;inputs)</td></tr>
<tr class="separator:a52747dc693e68fe208daf290dc6b5f54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58785ce7beacbbb5b38ee50baab18430" id="r_a58785ce7beacbbb5b38ee50baab18430"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a58785ce7beacbbb5b38ee50baab18430">encoder</a> (<a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;model, std::size_t m=0)</td></tr>
<tr class="separator:a58785ce7beacbbb5b38ee50baab18430"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af637c896bf9edd55a3184a135a4334e2" id="r_af637c896bf9edd55a3184a135a4334e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#af637c896bf9edd55a3184a135a4334e2">decoder</a> (<a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;model, std::size_t m=0)</td></tr>
<tr class="separator:af637c896bf9edd55a3184a135a4334e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a377bad66488acb59ab44a3c7ee21ea" id="r_a8a377bad66488acb59ab44a3c7ee21ea"><td class="memItemLeft" align="right" valign="top">RealVector const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a8a377bad66488acb59ab44a3c7ee21ea">eigenvalues</a> () const</td></tr>
<tr class="separator:a8a377bad66488acb59ab44a3c7ee21ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a495d0d796ea14d28c6b56643c271ed9b" id="r_a495d0d796ea14d28c6b56643c271ed9b"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a495d0d796ea14d28c6b56643c271ed9b">eigenvalue</a> (std::size_t i) const</td></tr>
<tr class="memdesc:a495d0d796ea14d28c6b56643c271ed9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns ith eigenvalue.  <br /></td></tr>
<tr class="separator:a495d0d796ea14d28c6b56643c271ed9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ef11fb10a4914cf2a60da03512a4230" id="r_a0ef11fb10a4914cf2a60da03512a4230"><td class="memItemLeft" align="right" valign="top">RealMatrix const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a0ef11fb10a4914cf2a60da03512a4230">eigenvectors</a> () const</td></tr>
<tr class="separator:a0ef11fb10a4914cf2a60da03512a4230"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a752eeeb52e068a200891e1419b367033" id="r_a752eeeb52e068a200891e1419b367033"><td class="memItemLeft" align="right" valign="top">RealVector const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a752eeeb52e068a200891e1419b367033">mean</a> () const</td></tr>
<tr class="memdesc:a752eeeb52e068a200891e1419b367033"><td class="mdescLeft">&#160;</td><td class="mdescRight">mean of last training  <br /></td></tr>
<tr class="separator:a752eeeb52e068a200891e1419b367033"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_unsupervised_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_unsupervised_trainer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html">shark::AbstractUnsupervisedTrainer&lt; LinearModel&lt;&gt; &gt;</a></td></tr>
<tr class="memitem:a0d63179d733c998593e3966ffdf17e62 inherit pub_methods_classshark_1_1_abstract_unsupervised_trainer" id="r_a0d63179d733c998593e3966ffdf17e62"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html#a0d63179d733c998593e3966ffdf17e62">train</a> (<a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html#a92fa6ed2ab64402cb414e3c19e9edeaf">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_unsupervised_trainer.html#a2fcc37e7133ddcadb66ffb9fa335ed1e">DatasetType</a> const &amp;inputset)=0</td></tr>
<tr class="memdesc:a0d63179d733c998593e3966ffdf17e62 inherit pub_methods_classshark_1_1_abstract_unsupervised_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Core of the Trainer interface.  <br /></td></tr>
<tr class="separator:a0d63179d733c998593e3966ffdf17e62 inherit pub_methods_classshark_1_1_abstract_unsupervised_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_nameable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_nameable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_nameable.html">shark::INameable</a></td></tr>
<tr class="memitem:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable" id="r_a877dbdfc6b58ea836495143cea44a98c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_nameable.html#a877dbdfc6b58ea836495143cea44a98c">~INameable</a> ()</td></tr>
<tr class="separator:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_serializable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_serializable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_serializable.html">shark::ISerializable</a></td></tr>
<tr class="memitem:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable" id="r_a7baa9ce108d7278822297ce15882782a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a7baa9ce108d7278822297ce15882782a">~ISerializable</a> ()</td></tr>
<tr class="memdesc:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual d'tor.  <br /></td></tr>
<tr class="separator:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable" id="r_ad4ad9a7c274deff642f91e98417fbc63"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#ad4ad9a7c274deff642f91e98417fbc63">read</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive)</td></tr>
<tr class="memdesc:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the component from the supplied archive.  <br /></td></tr>
<tr class="separator:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable" id="r_a9bddedd42933c922e323b73131f62f12"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a9bddedd42933c922e323b73131f62f12">write</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive) const</td></tr>
<tr class="memdesc:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the component to the supplied archive.  <br /></td></tr>
<tr class="separator:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable" id="r_abdda0c5b8e065b8afbac2cba8f58e841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#abdda0c5b8e065b8afbac2cba8f58e841">load</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive, unsigned int version)</td></tr>
<tr class="memdesc:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned loading of components, calls read(...).  <br /></td></tr>
<tr class="separator:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable" id="r_a5bf66fa8db15cc529bec98976a2f5255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a5bf66fa8db15cc529bec98976a2f5255">save</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive, unsigned int version) const</td></tr>
<tr class="memdesc:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned storing of components, calls write(...).  <br /></td></tr>
<tr class="separator:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable" id="r_a4560a94e8f4908fe8627e41e7d965735"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a4560a94e8f4908fe8627e41e7d965735">BOOST_SERIALIZATION_SPLIT_MEMBER</a> ()</td></tr>
<tr class="separator:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a09654e9c3e1eba7522ab8e389457fbd0" id="r_a09654e9c3e1eba7522ab8e389457fbd0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a09654e9c3e1eba7522ab8e389457fbd0">m_whitening</a></td></tr>
<tr class="memdesc:a09654e9c3e1eba7522ab8e389457fbd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">normalize variance yes/no  <br /></td></tr>
<tr class="separator:a09654e9c3e1eba7522ab8e389457fbd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae49e453937be746737aa2d13b38e16a1" id="r_ae49e453937be746737aa2d13b38e16a1"><td class="memItemLeft" align="right" valign="top">RealMatrix&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#ae49e453937be746737aa2d13b38e16a1">m_eigenvectors</a></td></tr>
<tr class="memdesc:ae49e453937be746737aa2d13b38e16a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">eigenvectors  <br /></td></tr>
<tr class="separator:ae49e453937be746737aa2d13b38e16a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fa5f42a2412a520846a57323bdf0376" id="r_a4fa5f42a2412a520846a57323bdf0376"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a4fa5f42a2412a520846a57323bdf0376">m_eigenvalues</a></td></tr>
<tr class="memdesc:a4fa5f42a2412a520846a57323bdf0376"><td class="mdescLeft">&#160;</td><td class="mdescRight">eigenvalues  <br /></td></tr>
<tr class="separator:a4fa5f42a2412a520846a57323bdf0376"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a4657da75acb0e29002f9d50cc6a298" id="r_a1a4657da75acb0e29002f9d50cc6a298"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a1a4657da75acb0e29002f9d50cc6a298">m_mean</a></td></tr>
<tr class="memdesc:a1a4657da75acb0e29002f9d50cc6a298"><td class="mdescLeft">&#160;</td><td class="mdescRight">mean value  <br /></td></tr>
<tr class="separator:a1a4657da75acb0e29002f9d50cc6a298"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaf333706ff30d74832d6e18c01c8dfa" id="r_afaf333706ff30d74832d6e18c01c8dfa"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#afaf333706ff30d74832d6e18c01c8dfa">m_n</a></td></tr>
<tr class="memdesc:afaf333706ff30d74832d6e18c01c8dfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of attributes  <br /></td></tr>
<tr class="separator:afaf333706ff30d74832d6e18c01c8dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a784a8145636a7f0a4ca7b196900e71" id="r_a4a784a8145636a7f0a4ca7b196900e71"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a4a784a8145636a7f0a4ca7b196900e71">m_l</a></td></tr>
<tr class="memdesc:a4a784a8145636a7f0a4ca7b196900e71"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of training data points  <br /></td></tr>
<tr class="separator:a4a784a8145636a7f0a4ca7b196900e71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2987f11dfe9ee6e005e93ea7fca138ec" id="r_a2987f11dfe9ee6e005e93ea7fca138ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735">PCAAlgorithm</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_p_c_a.html#a2987f11dfe9ee6e005e93ea7fca138ec">m_algorithm</a></td></tr>
<tr class="memdesc:a2987f11dfe9ee6e005e93ea7fca138ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">whether to use design matrix or its transpose for building covariance matrix  <br /></td></tr>
<tr class="separator:a2987f11dfe9ee6e005e93ea7fca138ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Principal Component Analysis. </p>
<p>The Principal Component Analysis, also known as Karhunen-Loeve transformation, takes a symmetric \( n \times n \) matrix \( A \) and uses its decomposition</p>
<p>\(
     A = \Gamma \Lambda \Gamma^T,
 \)</p>
<p>where \( \Lambda \) is the diagonal matrix of eigenvalues of \( A \) and \( \Gamma \) is the orthogonal matrix with the corresponding eigenvectors as columns. \( \Lambda \) then defines a successive orthogonal rotation that maximizes the variances of the coordinates, i.e. the coordinate system is rotated in such a way that the correlation between the new axes becomes zero. If there are \( p \) axes, the first axis is rotated in a way that the points on the new axis have maximum variance. Then the remaining \( p - 1 \) axes are rotated such that a another axis covers a maximum part of the rest variance, that is not covered by the first axis. After the rotation of \( p - 1 \) axes, the rotation destination of axis no. \( p \) is fixed. An application for <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a> is the reduction of dimensions by skipping the components with the least corresponding eigenvalues/variances. Furthermore, the eigenvalues may be rescaled to one, resulting in a whitening of the data. </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00073">73</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="ad3b450f29c9b4b265f0d16039cac8735" name="ad3b450f29c9b4b265f0d16039cac8735"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3b450f29c9b4b265f0d16039cac8735">&#9670;&#160;</a></span>PCAAlgorithm</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735">shark::PCA::PCAAlgorithm</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ad3b450f29c9b4b265f0d16039cac8735aa46a1b1a70f542e1569589fb42528d6d" name="ad3b450f29c9b4b265f0d16039cac8735aa46a1b1a70f542e1569589fb42528d6d"></a>STANDARD&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad3b450f29c9b4b265f0d16039cac8735aa87e03fd3af865af990a4fdd3f0551b3" name="ad3b450f29c9b4b265f0d16039cac8735aa87e03fd3af865af990a4fdd3f0551b3"></a>SMALL_SAMPLE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad3b450f29c9b4b265f0d16039cac8735a91ee8e8923d2abb8c39354c99194c27f" name="ad3b450f29c9b4b265f0d16039cac8735a91ee8e8923d2abb8c39354c99194c27f"></a>AUTO&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00078">78</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a439006abce1b7c09792b7c574a2d709e" name="a439006abce1b7c09792b7c574a2d709e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a439006abce1b7c09792b7c574a2d709e">&#9670;&#160;</a></span>PCA() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">shark::PCA::PCA </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>whitening</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor. The parameter defines whether the model should also whiten the data. </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00083">83</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735a91ee8e8923d2abb8c39354c99194c27f">AUTO</a>, and <a class="el" href="classshark_1_1_p_c_a.html#a2987f11dfe9ee6e005e93ea7fca138ec">m_algorithm</a>.</p>

</div>
</div>
<a id="a655563cb672cb1a67071e73fdf11a24c" name="a655563cb672cb1a67071e73fdf11a24c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a655563cb672cb1a67071e73fdf11a24c">&#9670;&#160;</a></span>PCA() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">shark::PCA::PCA </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; RealVector &gt; const &amp;&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>whitening</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor. The parameter defines whether the model should also whiten the data. The eigendecomposition of the data is stored inthe <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a> object. </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00091">91</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735a91ee8e8923d2abb8c39354c99194c27f">AUTO</a>, <a class="el" href="classshark_1_1_p_c_a.html#a2987f11dfe9ee6e005e93ea7fca138ec">m_algorithm</a>, and <a class="el" href="classshark_1_1_p_c_a.html#a52747dc693e68fe208daf290dc6b5f54">setData()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af637c896bf9edd55a3184a135a4334e2" name="af637c896bf9edd55a3184a135a4334e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af637c896bf9edd55a3184a135a4334e2">&#9670;&#160;</a></span>decoder()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::PCA::decoder </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>m</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a model mapping encoded data from the m-dimensional <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a> coordinate system back to the n-dimensional original coordinate system. </p>

<p class="reference">Referenced by <a class="el" href="_p_c_a_tutorial_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a id="a495d0d796ea14d28c6b56643c271ed9b" name="a495d0d796ea14d28c6b56643c271ed9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a495d0d796ea14d28c6b56643c271ed9b">&#9670;&#160;</a></span>eigenvalue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::PCA::eigenvalue </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns ith eigenvalue. </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00142">142</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#a4fa5f42a2412a520846a57323bdf0376">m_eigenvalues</a>, <a class="el" href="classshark_1_1_p_c_a.html#a4a784a8145636a7f0a4ca7b196900e71">m_l</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="_p_c_a_tutorial_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a id="a8a377bad66488acb59ab44a3c7ee21ea" name="a8a377bad66488acb59ab44a3c7ee21ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a377bad66488acb59ab44a3c7ee21ea">&#9670;&#160;</a></span>eigenvalues()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector const  &amp; shark::PCA::eigenvalues </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Eigenvalues of last training. The number of eigenvalues is equal to the minimum of the input dimensions (i.e., number of attributes) and the number of data points used for training the <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a>. </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00138">138</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#a4fa5f42a2412a520846a57323bdf0376">m_eigenvalues</a>.</p>

<p class="reference">Referenced by <a class="el" href="_p_c_a_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a id="a0ef11fb10a4914cf2a60da03512a4230" name="a0ef11fb10a4914cf2a60da03512a4230"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ef11fb10a4914cf2a60da03512a4230">&#9670;&#160;</a></span>eigenvectors()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealMatrix const  &amp; shark::PCA::eigenvectors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Eigenvectors of last training. The number of eigenvectors is equal to the minimum of the input dimensions (i.e., number of attributes) and the number of data points used for training the <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a>. </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00153">153</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#ae49e453937be746737aa2d13b38e16a1">m_eigenvectors</a>.</p>

</div>
</div>
<a id="a58785ce7beacbbb5b38ee50baab18430" name="a58785ce7beacbbb5b38ee50baab18430"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58785ce7beacbbb5b38ee50baab18430">&#9670;&#160;</a></span>encoder()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::PCA::encoder </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>m</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a model mapping the original data to the m-dimensional <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a> coordinate system. </p>

<p class="reference">Referenced by <a class="el" href="_p_c_a_tutorial_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>, and <a class="el" href="classshark_1_1_p_c_a.html#aeae45267c5bc7a3cda484b203a1f15be">train()</a>.</p>

</div>
</div>
<a id="a752eeeb52e068a200891e1419b367033" name="a752eeeb52e068a200891e1419b367033"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a752eeeb52e068a200891e1419b367033">&#9670;&#160;</a></span>mean()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector const  &amp; shark::PCA::mean </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>mean of last training </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00158">158</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#a1a4657da75acb0e29002f9d50cc6a298">m_mean</a>.</p>

<p class="reference">Referenced by <a class="el" href="_p_c_a_tutorial_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a id="a900a33903800136e115a2d208067cba9" name="a900a33903800136e115a2d208067cba9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a900a33903800136e115a2d208067cba9">&#9670;&#160;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string shark::PCA::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_nameable.html#a9893f99314de30cd472e649c235d0db4">shark::INameable</a>.</p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00098">98</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

</div>
</div>
<a id="a52747dc693e68fe208daf290dc6b5f54" name="a52747dc693e68fe208daf290dc6b5f54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52747dc693e68fe208daf290dc6b5f54">&#9670;&#160;</a></span>setData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::PCA::setData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; RealVector &gt; const &amp;&#160;</td>
          <td class="paramname"><em>inputs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the input data and performs the <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a>. This is a computationally costly operation. The eigendecomposition of the data is stored inthe <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a> object. </p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_p_c_a.html#a655563cb672cb1a67071e73fdf11a24c">PCA()</a>, and <a class="el" href="classshark_1_1_p_c_a.html#aeae45267c5bc7a3cda484b203a1f15be">train()</a>.</p>

</div>
</div>
<a id="a13027f51bff74d5b7a39d4040a9aa403" name="a13027f51bff74d5b7a39d4040a9aa403"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13027f51bff74d5b7a39d4040a9aa403">&#9670;&#160;</a></span>setWhitening()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::PCA::setWhitening </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>whitening</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>If set to true, the encoded data has unit variance along the new coordinates. </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00103">103</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#a09654e9c3e1eba7522ab8e389457fbd0">m_whitening</a>.</p>

<p class="reference">Referenced by <a class="el" href="_p_c_a_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a id="aeae45267c5bc7a3cda484b203a1f15be" name="aeae45267c5bc7a3cda484b203a1f15be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeae45267c5bc7a3cda484b203a1f15be">&#9670;&#160;</a></span>train()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::PCA::train </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; RealVector &gt; const &amp;&#160;</td>
          <td class="paramname"><em>inputs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Train the model to perform <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a>. The model must be a <a class="el" href="classshark_1_1_linear_model.html" title="Linear Prediction with optional activation function.">LinearModel</a> object with offset, and its output dimension defines the number of principal components represented. The model returned is the one given by the econder() function (i.e., mapping from the original input space to the <a class="el" href="classshark_1_1_p_c_a.html" title="Principal Component Analysis.">PCA</a> coordinate system). </p>
<p>&lt; reduced dimensionality</p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00113">113</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_p_c_a.html#a58785ce7beacbbb5b38ee50baab18430">encoder()</a>, <a class="el" href="classshark_1_1_shape.html#ad36fc62c674b01150cc5addab9dcc38d">shark::Shape::numElements()</a>, <a class="el" href="classshark_1_1_linear_model.html#a9eeb86bc2b2c822fa5b9617e80a98d91">shark::LinearModel&lt; InputType, ActivationFunction &gt;::outputShape()</a>, and <a class="el" href="classshark_1_1_p_c_a.html#a52747dc693e68fe208daf290dc6b5f54">setData()</a>.</p>

<p class="reference">Referenced by <a class="el" href="_p_c_a_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a2987f11dfe9ee6e005e93ea7fca138ec" name="a2987f11dfe9ee6e005e93ea7fca138ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2987f11dfe9ee6e005e93ea7fca138ec">&#9670;&#160;</a></span>m_algorithm</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_p_c_a.html#ad3b450f29c9b4b265f0d16039cac8735">PCAAlgorithm</a> shark::PCA::m_algorithm</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>whether to use design matrix or its transpose for building covariance matrix </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00171">171</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_p_c_a.html#a439006abce1b7c09792b7c574a2d709e">PCA()</a>, and <a class="el" href="classshark_1_1_p_c_a.html#a655563cb672cb1a67071e73fdf11a24c">PCA()</a>.</p>

</div>
</div>
<a id="a4fa5f42a2412a520846a57323bdf0376" name="a4fa5f42a2412a520846a57323bdf0376"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4fa5f42a2412a520846a57323bdf0376">&#9670;&#160;</a></span>m_eigenvalues</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector shark::PCA::m_eigenvalues</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>eigenvalues </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00165">165</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_p_c_a.html#a495d0d796ea14d28c6b56643c271ed9b">eigenvalue()</a>, and <a class="el" href="classshark_1_1_p_c_a.html#a8a377bad66488acb59ab44a3c7ee21ea">eigenvalues()</a>.</p>

</div>
</div>
<a id="ae49e453937be746737aa2d13b38e16a1" name="ae49e453937be746737aa2d13b38e16a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae49e453937be746737aa2d13b38e16a1">&#9670;&#160;</a></span>m_eigenvectors</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealMatrix shark::PCA::m_eigenvectors</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>eigenvectors </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00164">164</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_p_c_a.html#a0ef11fb10a4914cf2a60da03512a4230">eigenvectors()</a>.</p>

</div>
</div>
<a id="a4a784a8145636a7f0a4ca7b196900e71" name="a4a784a8145636a7f0a4ca7b196900e71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a784a8145636a7f0a4ca7b196900e71">&#9670;&#160;</a></span>m_l</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t shark::PCA::m_l</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>number of training data points </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00169">169</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_p_c_a.html#a495d0d796ea14d28c6b56643c271ed9b">eigenvalue()</a>.</p>

</div>
</div>
<a id="a1a4657da75acb0e29002f9d50cc6a298" name="a1a4657da75acb0e29002f9d50cc6a298"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a4657da75acb0e29002f9d50cc6a298">&#9670;&#160;</a></span>m_mean</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector shark::PCA::m_mean</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>mean value </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00166">166</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_p_c_a.html#a752eeeb52e068a200891e1419b367033">mean()</a>.</p>

</div>
</div>
<a id="afaf333706ff30d74832d6e18c01c8dfa" name="afaf333706ff30d74832d6e18c01c8dfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afaf333706ff30d74832d6e18c01c8dfa">&#9670;&#160;</a></span>m_n</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t shark::PCA::m_n</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>number of attributes </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00168">168</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

</div>
</div>
<a id="a09654e9c3e1eba7522ab8e389457fbd0" name="a09654e9c3e1eba7522ab8e389457fbd0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09654e9c3e1eba7522ab8e389457fbd0">&#9670;&#160;</a></span>m_whitening</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool shark::PCA::m_whitening</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>normalize variance yes/no </p>

<p class="definition">Definition at line <a class="el" href="_p_c_a_8h_source.html#l00163">163</a> of file <a class="el" href="_p_c_a_8h_source.html">PCA.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_p_c_a.html#a13027f51bff74d5b7a39d4040a9aa403">setWhitening()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/Trainers/<a class="el" href="_p_c_a_8h_source.html">PCA.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
